home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 099 (1989-05-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 099 (1989-05-15)(Ossowski, Stefan)(DE)(PD).adf / PCQ / Source / Pasvar.i < prev    next >
Text File  |  1989-03-31  |  3KB  |  84 lines

  1.  
  2. {
  3.     pasvar.i (of PCQ Pascal)
  4.     Copyright (c) 1989 Patrick Quaid.
  5.  
  6.     These are the global variables for the compiler.  When this
  7. file is included by the main program, space is allocated for the
  8. variables (over 60k at the moment).  The external files, although
  9. they also import this file, just generate external references.
  10. }
  11.  
  12. {
  13.     Eventually this array will go.  It is a remnant of the deep
  14. past, when the Small-C roots of the compiler made pointers a
  15. questionable proposition.  Now that I'm more confident with
  16. addressing, the next version will just use dynamically allocated
  17. records.
  18. }
  19.  
  20.     idents        : array [1..symtablesize] of idrecord;
  21.     identptr    : integer;
  22.  
  23. { Allocate space to hold identifier names. }
  24.  
  25.     spelling    : array [1..spellsize] of char;
  26.     spellptr    : integer;
  27.  
  28. { Space for literal strings and arrays in the program text }
  29.  
  30.     litq        : array [1..literalsize] of char;
  31.     litptr        : integer;
  32.  
  33. { The reserved words, held here in order to make searching quicker }
  34.  
  35.     reserved    : array [1..lastreserved] of string;
  36.  
  37. { These four implement the error queue, which prints out the latest
  38. 128 chars or two lines, whichever is less, when an error occurs }
  39.  
  40.     errorq        : array [1..eqsize] of char;
  41.     eqstart        : integer;
  42.     eqend        : integer;
  43.     errorptr    : integer;
  44.  
  45. { Many of these are named similar to the vars in Small-C, but watch
  46. out for different meanings. }
  47.  
  48.     nxtlab        : integer;    { Just the current label }
  49.     litlab        : integer;    { Label of the literals }
  50.     argstk        : integer;    { Counts local var stack space }
  51.     errorcount    : integer;    { Literally the # of errors }
  52.     input        : text;        { The main program file }
  53.     output        : text;        { The main assembly output }
  54.     input2        : text;        { If open, the include file }
  55.     mainmode    : boolean;    { Is this a program file? }
  56.     fnstart        : integer;    { The line # of the start of this }
  57.     lineno        : integer;    { Current line number. }
  58.     savestart    : integer;    { These four save the state }
  59.     saveline    : integer;    { of the main file during }
  60.     savechar    : char;        { includes }
  61.  
  62.     currfn        : integer;    { Index of current proc or func }
  63.     savecurr    : integer;    { Space to save the above }
  64.     prevarg        : integer;    { Used to link params in decl }
  65.     blocklevel    : integer;    { Nesting depth }
  66.     badtype        : integer;    { Universal type index }
  67.     inttype        : integer;    { These are just the indices }
  68.     booltype    : integer;    { of the appropriate types }
  69.     realtype    : integer;
  70.     chartype    : integer;
  71.     texttype    : integer;
  72.     stringtype    : integer;
  73.     shorttype    : integer;
  74.     bytetype    : integer;
  75.     literaltype    : integer;    { Temp type for array lits }
  76.     currsym        : integer;    { Current symbol }
  77.     symloc        : integer;    { Literal integer }
  78.     symtext        : string;    { Holds ident. text }
  79.     currentchar    : char;        { The current char! }
  80.     including    : boolean;    { Taking input from include }
  81.     rangecheck    : boolean;    { Doing rangechecks? }
  82.     MainName    : string;    { Main file name }
  83.     IncludeName    : string;    { Current include file name }
  84.